import request from '@/utils/request'
/**
 * 获取月卡列表
 * @param {*} params 参数
 * @returns
 */
export function getCardListAPI(params) {
  return request({
    url: '/parking/card/list',
    params
  })
}
/**
 *获取添加详情
 * @param {*} data 参数数据
 * @returns
 */
export function addCardAPI(data) {
  return request({
    url: '/parking/card',
    method: 'POST',
    data
  })
}
/**
 * 获取月卡详情
 * @param {*} id 月卡id
 * @returns
 */
export function getCardDetailAPI(id) {
  return request.get(`/parking/card/detail/${id}`)
}
/**
 * 编辑月卡
 * @param {*} data
 * @returns
 */
export function editCardAPI(data) {
  return request({
    url: '/parking/card/edit',
    method: 'PUT',
    data
  })
}
/**
 * 编辑删除接口
 * @param {*} id 删除的id
 * @returns
 */
export function deleteCardAPI(id) {
  return request.delete(`https://api-hmzs.itheima.net/v1/parking/card/${id}`)
}
